﻿#include "DAVariantValueNode.h"
#include "DAVariantValueNodeGraphicsItem.h"
#include <QObject>
#include "DANodeLinkPoint.h"
#define RES_VARIANT ":/icon/icon/variant.svg"

class DAVariantValueNodePrivate
{
    DA_IMPL_PUBLIC(DAVariantValueNode)
public:
    DAVariantValueNodePrivate(DAVariantValueNode *p);
    QList<QString> _output;
};

DAVariantValueNodePrivate::DAVariantValueNodePrivate(DAVariantValueNode *p) : q_ptr(p)
{
    _output << "out";
}

DAVariantValueNode::DAVariantValueNode() : DAAbstractNode(), d_ptr(new DAVariantValueNodePrivate(this))
{
    metaData().setIcon(QIcon(RES_VARIANT));
    metaData().setNodePrototype("FC.Util.Const");
    metaData().setNodeName(QObject::tr("variant"));
    metaData().setGroup(QObject::tr("common"));
}

DAVariantValueNode::~DAVariantValueNode() {}

QList<QString> DAVariantValueNode::getInputKeys() const
{
    return (QList<QString>());
}

QList<QString> DAVariantValueNode::getOutputKeys() const
{
    return (d_ptr->_output);
}

DAAbstractNodeGraphicsItem *DAVariantValueNode::createGraphicsItem()
{
    return (new DAVariantValueNodeGraphicsItem(shared_from_this()));
}

DADataPackage DAVariantValueNode::output(const QString &ouputkey)
{
    Q_UNUSED(ouputkey);
    return (DADataPackage());
}
